{{extend defaultLayout}}

{{block 'css'}}
<link rel="stylesheet" type="text/css" href="{{_res_path}}/sign/index.css"/>
{{@style}}
{{/block}}

{{block 'main'}}

<div class="info-box">
  <div class="head-box type{{bgType}}">
    <div class="title">#每日签到</div>
    <div class="name">{{Signin.name||"昵称"}}</div>
    <div class="data">{{todayDate.formattedDate||"日期"}}</div>
  </div>
</div>

<table id="calendar">
  <thead>
    <tr>
      <th>日</th>
      <th>一</th>
      <th>二</th>
      <th>三</th>
      <th>四</th>
      <th>五</th>
      <th>六</th>
    </tr>
  </thead>
  
  <tbody id="calendar-body">
    {{set idx = 0 }}
    <% for(let i=0; i< 6; i++){ %>
      <tr>
        <% for(let j=0; j< 7; j++){ %>
        <td>
          <% if(Signin.Signinds[idx] == 1){ %>
            <img width=50px  src="{{_res_path}}/sign/imgs/1.png"></img>
          <% } %>
          <% if(Signin.Signinds[idx] == 2){ %>
            <img width=50px  src="{{_res_path}}/sign/imgs/2.png"></img>
            <% if(Signin.signdey[idx] >= 2){ %>
            <div class="text">X{{Signin.signdey[idx]}}</div>
            <% } %>
          <% } %>
          <% if(Signin.Signinds[idx] == 3){ %>
            <img width=50px  src="{{_res_path}}/sign/imgs/jie.jpg"></img>
          <% } %>
          <a>
            {{todayDate.calendar[idx]}}
          </a>
        </td>
        <% idx++ %>
        <% } %>
      </tr>
      <% } %>
  </tbody>
</table>
{{/block}}